<template>
    <h1>{{ title }}</h1>
    <component :is="ComponentsName"></component>
</template>

<script setup lang="ts">
import parent from "./parent.vue";
import { useRoute } from "vue-router";
import { ref } from "vue";

const ComponentsName = parent;

const route = useRoute();

const title = ref("ref");

if (route.meta && route.meta.title) {
    title.value = route.meta.title as string;
}
</script>

<style scoped></style>
